#!bin/bash
git reset --hard
git pull
mvn clean package -Dmaven.test.skip=true
#删除容器
if [ $(docker ps -aq --filter name=framework-dubbo-producer) ]; then
  docker rm -f framework-dubbo-producer
fi
#删除镜像
if [[ $(docker images |grep ccf/framework-dubbo-producer) ]]; then
  docker rmi ccf/framework-dubbo-producer:v1.0
fi
docker build  -t ccf/framework-dubbo-producer:v1.0 .
docker run --restart=always   --name framework-dubbo-producer -d -p 8117:8117 -p 12333:12333 -e NACOS_NAME_SPACE=dev -e NACOS_GROUP=DEFAULT_GROUP ccf/framework-dubbo-producer:v1.0